**********************************************
**
** Replication Material
**
**********************************************


**********************************************
**
** Colombia
**
**********************************************

use "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Data\Colombia-Final Survey 02-28-2023_LAPS.dta", clear


**********************************************
**
**  Full Figures
**
**********************************************

**********************************************
**
** Impeach President
**
**********************************************

reg  ImpeachPresident TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==2
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==2
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(1) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Blanco voters, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlanco.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlanco.png", replace  

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==3
margins,  post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==3
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Hernandez Supporters, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachHernandez.gph",replace)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachHernandez.png",replace 


reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==1
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==1
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Petro Supporters, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachPetro.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachPetro.png",replace 

******************
**
** DisolveCongress
**
******************

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==2
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==2
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Blanco voters, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressBlanco.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressBlanco.png",replace 


reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==3
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==3
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Hernandez Supporters, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressHernandez.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressHernandez.png",replace 


reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==1
margins,  post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==1
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Petro Supporters, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressPetro.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressPetro.png",replace 


graph combine  "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachPetro.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlanco.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachHernandez.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressPetro.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressBlanco.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveCongressHernandez.gph", ycommon xcommon iscale(*.5) saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullColombia.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Figures\FullColombia.png",replace 



**********************************************
**
**  Full Figures only Treatment and Control
**
**********************************************

******************
**
** Impeach President
**
******************

reg  ImpeachPresident vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0
margins,  by(vote_encode) post
est store Control

reg  ImpeachPresident vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1
margins,  by(vote_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, all parties, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaImpeach.gph",replace)


******************
**
** DisolveCongress
**
******************

reg  DisolveCongress vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0
margins,  by(vote_encode) post
est store Control

reg  DisolveCongress vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1
margins,  by(vote_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, all parties, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaDissolve.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaDissolve.png",replace 


graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaImpeach.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaDissolve.gph", ycommon xcommon iscale(*.9) xsize(11) ysize(5)  saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullColombiaBase.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullColombiaBase.png",replace 

**********************************************
**
**  Autopsy, Colombia
**
**********************************************

******************
**
** Like by party
**
******************

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==2
margins,  by(E12Treatment_encode) post
est store Blanco

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==1
margins,  by(E12Treatment_encode) post
est store Petro

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==3
margins,  by(E12Treatment_encode) post
est store Hernandez

esttab Petro Blanco Hernandez using "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Tables - Paper\likeModel_Colombia.tex", replace se b(3) label nogaps booktabs mtitle("Petro Voters" "Blank Voters" "Hernandez Voters") title("Colombia, OLS 'Like' estimates by Party") note("Standard errors in parentheses") star(* 0.10 ** 0.05 *** 0.01)


coefplot  (Petro, mc(red)  ciopts(recast(rbarm) lw(.4) color(red%60))) (Blanco, mc(gray)  ciopts(recast(rbarm) lw(.4) color(gray%60)))  (Hernandez, mc(blue) lcolor(blue%60)  ciopts(recast(rbarm) lw(.4) color(blue%60))), sch(538) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Rate of Like, all parties, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ColombiaAutopsy1.gph",replace)


******************
**
** Anger by party
**
******************

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==2
margins,  by(E12Treatment_encode) post
est store Blanco

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==1
margins,  by(E12Treatment_encode) post
est store Petro

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==3
margins,  by(E12Treatment_encode) post
est store Hernandez

esttab Petro Blanco Hernandez using "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Tables - Paper\angryModel_Colombia.tex", replace se b(3) label nogaps booktabs mtitle("Petro Voters" "Blank Voters" "Hernandez Voters") title("Colombia, OLS 'Angry' estimates by Party") note("Standard errors in parentheses") star(* 0.10 ** 0.05 *** 0.01)

coefplot  (Petro, mc(red)  ciopts(recast(rbarm) lw(.4) color(red%60))) (Blanco, mc(gray)  ciopts(recast(rbarm) lw(.4) color(gray%60)))  (Hernandez, mc(blue) lcolor(blue%60)  ciopts(recast(rbarm) lw(.4) color(blue%60))), sch(538) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Self-reported anger, all parties, Colombia") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ColombiaAutopsy2.gph",replace)



**********************************************
**
** Brazil
**
**********************************************

use "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Data\Brazil-Final Survey 12-15-2022_LAPS.dta", clear

**********************************************
**
**  Full Figures
**
**********************************************


******************
**
** Impeach President
**
******************

reg  ImpeachPresident TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==3
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==3
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("Like Rate") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Bolsonaro voters, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBolsonaro.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBolsonaro.png", replace  
 


reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==2
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==2
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Blanco voters, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlancoBrazil.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlancoBrazil.png", replace  
 

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==1
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==1
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Lula Supporters, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachLula.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachLula.png", replace  
  

******************
**
** DisolveCongress
**
******************

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==3
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==3
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Bolsonaro voters, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBolsonaro.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBolsonaro.png", replace  
    


reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==2
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==2
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Blanco voters, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBlancoBrazil.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBlancoBrazil.png", replace  
      


reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==1
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==1
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Lula Supporters, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveLula.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveLula.png", replace  
      

graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachLula.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlancoBrazil.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBolsonaro.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveLula.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBlancoBrazil.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBolsonaro.gph", ycommon xcommon iscale(*.5)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullBrazil.png",replace 
	  
	  
**********************************************
**
**  Full Figures only Treatment and Control
**
**********************************************

******************
**
** Impeach President
**
******************

reg  ImpeachPresident vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0
margins,  by(vote_encode) post
est store Control

reg  ImpeachPresident vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1
margins,  by(vote_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, all parties, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilImpeach.gph",replace)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileImpeach.png",replace 

******************
**
** DisolveCongress
**
******************

reg  DisolveCongress vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0
margins,  by(vote_encode) post
est store Control

reg  DisolveCongress vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1
margins,  by(vote_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, all parties, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilDissolve.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilDissolve.png",replace 


graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilImpeach.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilDissolve.gph", ycommon xcommon iscale(*.9) xsize(11) ysize(5) saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullBrazilBase.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullBrazilBase.png",replace 


**********************************************
**
**  Autopsy, Brazil
**
**********************************************

******************
**
** Like by party
**
******************

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==2
margins,  by(E12Treatment_encode) post
est store Blanco

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==1
margins,  by(E12Treatment_encode) post
est store Lula

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==3
margins,  by(E12Treatment_encode) post
est store Bolsonaro

esttab Lula Blanco Bolsonaro using "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Tables - Paper\likeModel_Brazil.tex", replace se b(3) label nogaps booktabs mtitle("Lula Voters" "Blank Voters" "Bolsonaro Voters") title("Brazil, OLS 'Like' estimates by Party") note("Standard errors in parentheses") star(* 0.10 ** 0.05 *** 0.01)


coefplot  (Lula, mc(red)  ciopts(recast(rbarm) lw(.4) color(red%60))) (Blanco, mc(gray)  ciopts(recast(rbarm) lw(.4) color(gray%60)))  (Bolsonaro, mc(blue) lcolor(blue%60)  ciopts(recast(rbarm) lw(.4) color(blue%60))), sch(538) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Rate of Like, all parties, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BrazilAutopsy1.gph",replace)


******************
**
** Anger by party
**
******************

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==2
margins,  by(E12Treatment_encode) post
est store Blanco

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==1
margins,  by(E12Treatment_encode) post
est store Lula

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==3
margins,  by(E12Treatment_encode) post
est store Bolsonaro

esttab Lula Blanco Bolsonaro using "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Tables - Paper\angryModel_Brazil.tex", replace se b(3) label nogaps booktabs mtitle("Lula Voters" "Blank Voters" "Bolsonaro Voters") title("Brazil, OLS 'Angry' estimates by Party") note("Standard errors in parentheses") star(* 0.10 ** 0.05 *** 0.01)


coefplot  (Lula, mc(red)  ciopts(recast(rbarm) lw(.4) color(red%60))) (Blanco, mc(gray)  ciopts(recast(rbarm) lw(.4) color(gray%60)))  (Bolsonaro, mc(blue) lcolor(blue%60)  ciopts(recast(rbarm) lw(.4) color(blue%60))), sch(538) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Self-Reported anger, all parties, Brazil") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BrazilAutopsy2.gph",replace)



**********************************************
**
** Chile
**
**********************************************

use "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Data\Chile-Final Survey 11-12-2022_LAPS.dta", clear

**********************************************
**
**  Full Figures
**
**********************************************

******************
**
** Impeach President
**
******************

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 SDEdad SDGenero SDEducacion if recessionTreatmen==0 & vote_==2
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 SDEdad SDGenero SDEducacion if recessionTreatmen==1 & vote_==2
margins, by(E12Treatment_encode) post
est store Treatment

coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Blanco voters, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlancoChile.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlancoChile.png", replace  
   


reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 SDEdad SDGenero SDEducacion if recessionTreatmen==0 & vote_==1
margins,  post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 SDEdad SDGenero SDEducacion if recessionTreatmen==1 & vote_==1
margins, by(E12Treatment_encode) post
est store Treatment

coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Boric voters, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBoricChile.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBoricChile.png", replace  
     

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 SDEdad SDGenero SDEducacion if recessionTreatmen==0 & vote_==3
margins, post
est store Control

reg  ImpeachPresident E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 SDEdad SDGenero SDEducacion if recessionTreatmen==1 & vote_==3
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538)  ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, Kast Supporters, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachKastChile.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachKastChile.png", replace  
       

******************
**
** DisolveCongress
**
******************

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==2
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==2
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538)  ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Blanco voters, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBlancoChile.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBlancoChile.png", replace  
     


reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==1
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==1
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538)  ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Boric voters, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBoricChile.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBoricChile.png", replace  
       


reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0 & vote_==3
margins, post
est store Control

reg  DisolveCongress E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1 & vote_==3
margins, by(E12Treatment_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538)  ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, Kast voters, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveKastChile.gph", replace  )

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveKastChile.png", replace  
         

graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBoricChile.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachBlancoChile.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ImpeachKastChile.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBoricChile.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveBlancoChile.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\DissolveKastChile.gph", ycommon xcommon iscale(*.5)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullChile.png", replace  


**********************************************
**
**  Full Figures only Treatment and Control
**
**********************************************

******************
**
** Impeach President
**
******************

reg  ImpeachPresident vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0
margins,  by(vote_encode) post
est store Control

reg  ImpeachPresident vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1
margins,  by(vote_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5)) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Impeaching the President, all parties, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileImpeach.gph",replace)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileImpeach.png",replace 

******************
**
** DisolveCongress
**
******************

reg  DisolveCongress vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==0
margins,  by(vote_encode) post
est store Control

reg  DisolveCongress vote_encode##vote_encode E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if recessionTreatmen==1
margins,  by(vote_encode) post
est store Treatment


coefplot  (Control, mc(blue)) (Treatment, mc(red)), sch(538) ysc(r(1(1)5))  levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Agreement with Disolving Congress, all parties, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileDissolve.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileDissolve.png",replace 


graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileImpeach.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileDissolve.gph", ycommon xcommon iscale(*.9) xsize(11) ysize(5) saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullChileBase.gph",replace) 

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullChileBase.png",replace 


**********************************************
**
**  Autopsy, Chile
**
**********************************************

******************
**
** Like by party
**
******************

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==2
margins,  by(E12Treatment_encode) post
est store Blanco

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==1
margins,  by(E12Treatment_encode) post
est store Boric

reg  likeE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==3
margins,  by(E12Treatment_encode) post
est store Kast

esttab Boric Blanco Kast using "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Tables - Paper\likeModel_Chile.tex", replace se b(3) label nogaps booktabs mtitle("Boric Voters" "Blank Voters" "Kast Voters") title("Chile, OLS 'Like' estimates by Party") note("Standard errors in parentheses") star(* 0.10 ** 0.05 *** 0.01)


coefplot  (Boric, mc(red)  ciopts(recast(rbarm) lw(.4) color(red%60))) (Blanco, mc(gray)  ciopts(recast(rbarm) lw(.4) color(gray%60)))  (Kast, mc(blue) lcolor(blue%60)  ciopts(recast(rbarm) lw(.4) color(blue%60))), sch(538) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Rate of Like, all parties, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ChileAutopsy1.gph",replace)



******************
**
** Anger by party
**
******************

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==2
margins,  by(E12Treatment_encode) post
est store Blanco

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==1
margins,  by(E12Treatment_encode) post
est store Boric

reg  AngryE12 E12Treatment_encode##E12Treatment_encode TrueE12 c.lnTimeE2##c.lnTimeE2 if vote_encode==3
margins,  by(E12Treatment_encode) post
est store Kast

esttab Boric Blanco Kast using "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Tables - Paper\angryModel_Chile.tex", replace se b(3) label nogaps booktabs mtitle("Boric Voters" "Blank Voters" "Kast Voters") title("Chile, OLS 'Angry' estimates by Party") note("Standard errors in parentheses") star(* 0.10 ** 0.05 *** 0.01)


coefplot  (Boric, mc(red)  ciopts(recast(rbarm) lw(.4) color(red%60))) (Blanco, mc(gray)  ciopts(recast(rbarm) lw(.4) color(gray%60)))  (Kast, mc(blue) lcolor(blue%60)  ciopts(recast(rbarm) lw(.4) color(blue%60))), sch(538) levels(95) ytitle("") xlab(,labsize(*1.1))  yti(,size(*.9)) ylab(,labsize(*.8)) vertical  fcolor(*.5) ciopts(recast(rbarm) lw(.4)) citop format(%9.2f)  addplot(scatter @b @at, ms(i) mlabel(@b) mlabpos(2) mlabcolor(black) mlabsize(vsmall)) graphregion(color(white))  leg(cols(1) symysize(3) forcesize ring(0) bplacement(swest) size(vsmall)) title("Self-Reported anger, all parties, Chile") saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ChileAutopsy2.gph",replace)



******************************************************
** IF ALL GRAPHS FROM THREE COUNTRIES CREATED

graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilImpeach.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseBrazilDissolve.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileImpeach.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseChileDissolve.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaImpeach.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BaseColombiaDissolve.gph", colfirst  ycommon xcommon iscale(*.8) xsize(20) ysize(10)  saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\FullAllCountriesBase.gph",replace)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Figures\threeCountries.png",replace 


**********************************************
**
**  Autopsy, All Countries
**
**********************************************

**ONCE ALL GRAPHS ARE MADE

**Autopsy 1 (Like)
graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BrazilAutopsy1.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ChileAutopsy1.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ColombiaAutopsy1.gph", colfirst cols(1) iscale(*.8) xsize(10) ysize(15) saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\AllAutopsy1.gph",replace)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Figures\Autopsy_Like_threeCountries.png",replace 


**Autopsy 1 (Anger)
graph combine "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\BrazilAutopsy2.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ChileAutopsy2.gph" "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\ColombiaAutopsy2.gph", colfirst cols(1) iscale(*.8) xsize(10) ysize(15) saving("E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\FiguresTreatmentEffectByPartyTypeOfTreatment\AllAutopsy2.gph",replace)

graph export "E:\Dropbox\Apps\Overleaf\PAP_Democratic Recession - Chile Colombia Brazil\Replication Material\Figures\Autops_Anger_threeCountries.png",replace 










